<!-- 1903010328 查询通行证 -->
<?php
include "../../inc/log/adsession.php";
?>
<!doctype html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>管理班级</title>
	<link rel="stylesheet" type="text/css" href="/28/inc/CSS/admin">
	<link rel="stylesheet" type="text/css" href="/28/inc/CSS/reset.css">
 <?php
include "../../inc/data/connAdmin.php";
$sql = "select stuid,stuname,classname from mamx_stu";
$stmt = $conn->prepare($sql);
$stmt->execute();
//绑定结果 
$stmt->bind_result($stuId,$stuName,$stuClass);
$stmt->store_result();
$stmt->fetch();
?> 
<!--1903010328 统计信息 -->
<?php
    $depName = $_GET["dep"];
 ?>
</head>
<body>
	<div id="tScoreln">
		<!--顶部-->
			<div id="top">
			<img src="/28/inc/pic/00.png">
			<!--导航栏区域和下拉列表-->
			<div id="top-rig">
			<ul>
			    <li><a href="">首页</a></li>
			    <li id="ddown"><a href="" id="dropbtn">学校概况</a>
				    <div id="ddown-content">
				    <a href="">学校简介</a>
				    <a href="">历任教师</a>
				    </div>
				</li>
				<li id="ddown"><a href="" id="dropbtn">国际合作</a>
				    <div id="ddown-content">
				    <a href="">交流概况</a>
				    <a href="">国际学生</a>
				    </div>
				</li>
				<li id="ddown"><a href="" id="dropbtn">院系部门</a>
				    <div id="ddown-content">
				    <a href="">党群机构</a>
				    <a href="">管理与服务机构</a>
				    </div>
				</li>
				<li id="ddown"><a href="" id="dropbtn">科学研究</a>
				    <div id="ddown-content">
				    <a href="">科研概况</a>
				    <a href="">重点学科</a>
				    </div>
				</li>
				<li id="ddown"><a href="" id="dropbtn">教师队伍</a>
				    <div id="ddown-content">
				    <a href="">总体介绍</a>
				    <a href="">杰出人才</a>
				    </div>
				</li>
				<li id="ddown"><a href="" id="dropbtn">人才培养</a>
				    <div id="ddown-content">
				    <a href="">继续教育</a>
				    <a href="">奖贷学金</a>
				    </div>
				</li>
				<li id="ddown"><a href="" id="dropbtn">人才招聘</a>
				    <div id="ddown-content">
				    <a href="">优秀博士后</a>
				    <a href="">应聘方式</a>
				    </div>
				</li>
                <li id="ddown"><a href="" id="dropbtn">招生就业</a>
				    <div id="ddown-content">
				    <a href="">本科生招生</a>
				    <a href="">就业服务</a>
				    </div>
				</li>
				<img src="/28/inc/pic/find1.png">
		    </ul>
			</div>
			</div>
	    <!--顶部结束-->
	    <!---->
	    	<div id="main">
	        	<img src="/28/inc/pic/position.png">
	    		当前位置: 后台首页-二级学院管理-<?=$depName?>-管理班级
	    <!--结束-->
	    <div id="yh">
	    <img src="/28/inc/pic/user.png" style="width:25px;height:25px;margin:3px 10px;">
		<!-- 1903010328 动态信息 -->
		<h4 style="margin:8px 10px;font-size:20px;color:#1D50A2">您好！
		<?=$_SESSION["uName"]?>
		</h4>
	    </div>
		<!--结束-->
		<!--1903010328 查询二级学院 -->
		<?php
    $sql = "select majorname from mamx_major 
    		where depname='$depName'";
    $stmt=$conn->prepare($sql);
  	$stmt->execute();
  	$stmt->bind_result($majorName);
  	$stmt->store_result();
  	$stmt->fetch();
    ?>
		<div style="">
		<table style="width:500px;border:4px solid #1D50A2;margin:50px auto;">
    <tr style="font-size:20px;text-align:center;font-weight:bold;color:#1da75b">
      <td>序号</td>
      <td>班级</td>
      <td>专业名称</td>
      <td>入学年份</td>
      <td>操作</td>
    </tr>
		 <?php
    $sql = "select mamx_class.majorname,classyear,classname,depname 
    		from mamx_class,mamx_major 
    		where mamx_class.majorname = mamx_major.majorname 
    		and depname = '$depName'";
    $re = $conn->query($sql);
    $i = 1;
    
    while ($row = $re->fetch_assoc()) {
     ?>
    <tr style="font-size:17px;text-align:center;color:#1d50a2;font-weight:600">
      <td><?=$i?></td>
      <td><?=$row["classname"]?></td>
      <td><?=$row["majorname"]?></td>
      <td><?=$row["classyear"]?></td>
      <td><a href="" style="color:#a25a1d;">修改</a> / <a href="" style="color:#7d49c2">删除</a></td>
    </tr>
    <?php 
    $i++; }
    ?>
    </table></div>
	    <!--表格区域-->
	 <form action="classExImport.php" enctype="multipart/form-data" method="post" style="" >
  <table  style="margin: 10px auto;border:4px solid #1D50A2" width="400px">
  <tr>
	<td style="width:300px">
     <input type="file" value="选择文件" name="classfile" style="width:300px;height:30px">
      </td>
      <td>
      <input type="hidden" value="<?=$majorName?>" name='major'>
      <input type="submit"  value="录入" style="width:100px;height:30px;background-color:#1D50A2;font-size:20px;text-align:center;color:white">
      </td>
      </tr>
  <tr>
    <td colspan="2" style="text-align:center">
   <a href="../../inc/download/majorDown.xlsx"><input type="submit" value="下载模板" style="width:100px;height:30px;background-color:#1da252;font-size:20px;text-align:center;color:white"></a>
    </td>
  </tr>
  </table>
</form>
	</div>
</body>
</html>